//=============================================================
// 创建人:            ssd
// 创建时间:          11/20/2024 10:28:32 AM
// 邮箱：             1292934053@qq.com
//==============================================================
using LF.Domain.Entities;
using LF.Domain;
using System.Collections.Generic;
using LF.Shared.Dtos.Input;

namespace LF.Domain.Services
{
    public interface IDeptmentManagerService: IDomainService
    {
        /// <summary>
        /// 分页查询部门列表
        /// </summary>
        List<Deptment> All(int index, int pageSize, string? key);
        
        /// <summary>
        /// 获取部门总数
        /// </summary>
        long Count(string? key);
        
        /// <summary>
        /// 获取部门树形结构
        /// </summary>
        List<Deptment> GetDeptTree();
        
        /// <summary>
        /// 获取所有部门
        /// </summary>
        List<Deptment> GetAll();
        
        /// <summary>
        /// 获取指定部门及其所有子部门
        /// </summary>
        List<Deptment> GetDeptWithChildren(Guid deptId);
        
        /// <summary>
        /// 检查部门编码是否存在
        /// </summary>
        bool CheckDeptCodeExists(string deptCode, Guid? excludeId = null);

        /// <summary>
        /// 生成部门编码
        /// </summary>
        string GenerateDeptCode(Guid? parentId);
    }
}